#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

const int N = 1e6 + 10;

int primes[N], cnt;
bool st[N];
LL n;

void get_primes(int n){
	for(int i = 2; i <= n; i ++){
		if(!st[i]) primes[cnt ++] = i;
			
		for(int j = 0; primes[j] <= n / i; j ++){
			st[primes[j] * i] = true; // 只筛一次
			if(i % primes[j] == 0) break;  // 一定用的x的最小质因子来筛
		}
	}
}



int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);


    get_primes(1e6);
    
    cin >> n;
    int res = 0;
    for(int i = 0; i < cnt; i ++){
        LL p = (LL)primes[i];
        for(int j = i + 1; j < cnt; j ++){
            LL q = (LL) primes[j];
            if(p * q * q > n / q) break;
          //  cout << "p: " << p << " q: " << q << '\n';
            res ++;
        }
    }


    cout << res;



    return 0;
}